%tr.oddeven{:id => "app-" + app_item[:name]}
  %td= link_to app_item[:name], app_info_url(app_item[:name])
  %td
    %span{:id => "app-" + app_item[:name] + "-tooltip"}= health(app_item).html_safe
    %div.tooltip{:id => "app-" + app_item[:name] + "-tooltipbox"}
      %table
        %thead
          %tr
            %th.thcenter{:scope => "col"}=t('apps.state_head')
            %th.thcenter{:scope => "col"}=t('apps.instances_head')
        %tbody
          - app_item[:instances_states].each do |instances_states_item|
            %tr
              %td.tdcenter
                %span{:style => "color: #{instances_states_item[:color]}"}= instances_states_item[:label]
              %td.tdcenter= instances_states_item[:data]
  %td= app_item[:instances]
  %td= pretty_size(app_item[:resources][:memory] * 1024 * 1024, 0)
  %td= pretty_size(app_item[:resources][:disk] * 1024 * 1024, 0)
  %td= find_vendor_image(app_item[:staging][:model]).html_safe
  %td= find_vendor_image(app_item[:staging][:stack]).html_safe
  %td
    - app_item[:services].each do |service_name|
      = find_vendor_image(service_name).html_safe
      %br/
  %td.tdcenter
    - if app_item[:state] == "STARTED"
      = link_to sprite_tag("restart", :title => t('apps.restart_app'), :class => "restart icon-tip"),
        app_restart_url(app_item[:name]), :id => "restart-app-link", :method => :put, :remote => true
      = link_to sprite_tag("stop", :title => t('apps.stop_app'), :class => "stop icon-tip"),
        app_stop_url(app_item[:name]), :id => "stop-app-link", :method => :put, :remote => true
    - else
      = link_to sprite_tag("start", :title => t('apps.start_app'), :class => "start icon-tip"),
        app_start_url(app_item[:name]), :id => "start-app-link", :method => :put, :remote => true
    - if git_deploy_available?
      = link_to sprite_tag("update-bits", :title => t('apps.upload_bits'), :class => "update-bits icon-tip"),
        app_update_bits_url(app_item[:name]), :rel => "#update_application_bits_modalBox", :class => "uploadAppBits"
    = link_to sprite_tag("delete", :title => t('apps.delete_app'), :class => "delete icon-tip"),
      app_delete_url(app_item[:name]), :id => "delete-app-link", :remote => true,
      :method => :delete, :data => { :confirm => t('apps.delete_app_confirm') }